

import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

class AXContainer extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return Container(
      ///四周10大小的maring
      margin: EdgeInsets.all(10.0),
      height: 40.0,
      width: 800.0,
      ///透明黑色遮罩
      decoration: BoxDecoration(
        ///弧度为4.0
        borderRadius: BorderRadius.vertical(top: Radius.circular(10), bottom: Radius.circular(10),),
        ///设置了decoration的color，就不能设置Container的color。
        color: Color.fromRGBO(0, 0, 0, 0.3),
        ///边框
        border: Border.all(color: Colors.black26, width: 0.3),
      ),
      child: Text(
        "Container边框加遮罩装饰",
        textAlign: TextAlign.center,
        style: TextStyle(color: Colors.white , fontSize: 20),
      ),
    );
  }
}